package com.rran.study.chat.friend.client;

import com.rran.study.chat.common.model.Response;
import com.rran.study.chat.friend.dto.request.AcceptFriendDTO;
import com.rran.study.chat.friend.dto.request.AddFriendDTO;
import com.rran.study.chat.friend.dto.response.QueryFriendAppListVO;
import com.rran.study.chat.friend.dto.response.QueryFriendsListVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "${chat-friend.url}",path = "/rran-friend")
public interface FriendApi {

    @GetMapping("friend/friendsList")
     Response<QueryFriendsListVO> queryFriendsList(@RequestParam("beanId") String beanId);

    @PostMapping("friend/addFriend")
    Response<Integer> addFriend(@RequestBody AddFriendDTO addFriendDTO);

    @PostMapping("friend/acceptFriend")
    Response<Integer> acceptFriend(@RequestBody AcceptFriendDTO acceptFriendDTO);

    @GetMapping("friend/friendApplicationRecords")
    Response<List<QueryFriendAppListVO>> friendApplicationRecords(@RequestParam("beanId") String beanId);

}
